<?php
/**
 * Created by PhpStorm.
 * User: Plutoer
 * Date: 2019/1/27
 * Time: 15:12
 * @module {name}
 */

$http = new swoole_http_server("0.0.0.0", 9503);

$http->on('request', function ($request, $response) {
    $data = $request->get . $request->post;
    $response->header("Content-Type", "text/html; charset=utf-8");
    $response->end("<h1>Hello Swoole. #" . rand(1000, 9999) . $data . "</h1>");
});

$http->start();